package apiDay02;

import java.util.SplittableRandom;

public class RegDemo04 {
    public static void main(String[] args) {
        /*
        String rule="HelloWorld";
        String s1 ="HelloKitty";
        String s2 ="HelloWorld";
        boolean b1 =s1.matches(rule);
        boolean b2 =s2.matches(rule);
        System.out.println(b1);
        System.out.println(b2);

         */
        String rule="Hello[123456]";
        String s1="Hello1";
        String s2="Hello8";
        System.out.println(s1.matches(rule));
        System.out.println(s2.matches(rule));


    }
}
